package com.jt.service;

import com.jt.anno.Cache;
import org.springframework.stereotype.Service;

@Service
public class DeptServiceImpl implements DeptService {
    @Override
    public void addDept() {
        System.out.println("添加部门");
    }

    @Override
    @Cache
    public void updateDept() {
        System.out.println("更新部门");
    }

    @Override
    @Cache
    public String after(Integer id) {
        return "Spring测试通知";
    }

    @Override
    @Cache
    public void afterThorwing() {
        System.out.println("用户执行目标方法");
        int a = 1/0;
    }

    @Override
    @Cache
    public void testAround() {
        System.out.println("环绕通知测试方法");
    }
}
